package cn.zwx.security.example.common.enums;

/**
 * @description:
 * @projectName:spring-boot-security-example
 * @see:cn.zwx.security.example.common.emuns
 * @author:zhangwenxue
 * @createTime:2021/6/23 14:58
 * @version:1.0
 */
public enum ResultCodeEnum {
    // 数据操作错误定义
    SUCCESS(200, "nice"),
    NO_PERMISSION(403,"你没得权限"),
    NO_AUTH(401,"你能不能先登录一下"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "服务器跑路了"),
    PARAMS_EMPTY_ERROR(99998,"参数不合法"),
    USER_NAME_IS_NOT_FOUND(200001,"用户名不存在"),
    USER_IS_FREEZE(200002,"用户被冻结"),
    INCORRECT_USERNAME_PASSWORD(200003,"用户名密码不正确"),
    LOGIN_FAILED(200004,"登录失败"),


    ;

    /** 错误码 */
    private Integer errorCode;

    /** 错误信息 */
    private String errorMsg;

    ResultCodeEnum(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public Integer getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }
}
